﻿using System;
using System.Web;
using System.Web.Security;
using BO.Infrastructure.Config;
using BO.ProjectManager;

namespace GUI.Pages.VietID
{
    public partial class LogOut : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                FormsAuthentication.SignOut();
            }
            catch
            {
            }
            var returnUrl = Request.QueryString["returnUrl"] ?? string.Empty;
            if (!string.IsNullOrEmpty(returnUrl))
            {
                Response.Write(string.Format("<script>parent.document.location.href = \"{0}\";</script>", returnUrl));
                return;
            }


            Response.Redirect(AppSettings.Domain);
        }
    }
}